<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<title>无标题文档</title>
	<link href="/static/css/default.css" rel="stylesheet" type="text/css">
	<link href="/static/css/style/green.css" rel="stylesheet" type="text/css" id='link'>
</head>

<body style="overflow:hidden; padding:10px;">
	<form>
		<table class="formtable" style="width:580px;">

			<tbody>

				<tr>
					<td class="tlabel">家长姓名</td>
					<td>
						<input type="text" class="forminput inputstyle1" id="truename" value="{$info.truename}">
					</td>
				</tr>
				{if condition="$info.id!=''"}

				{else /}
				<tr>
					<td class="tlabel">手机</td>
					<td>
						<input type="text" class="forminput inputstyle1" id="phone" value="{$info.phone}">
					</td>
				</tr>

				{/if}






			</tbody>

		</table>

		<div class="formbtn">
			<input type="button" value="保存" class="btnsave">
			<input type="button" value="取消" class="btncancel">
		</div>
		<input type="hidden" id="id" value="{$info.id}" />
	</form>


</body>
<script type="text/javascript" src="/static/js/jquery.js"></script>
<script type="text/javascript" src="/static/js/common.js"></script>
<script type="text/javascript" src="/static/js/vue2.js"></script>
<script src="/static/js/layer/layer.js"></script>
<script>
	var sex = "{$info.sex}";

	$(function () {
		$(".btnsave").click(function () {
			var id = $("#id").val();
			var truename = $("#truename").val();
			var phone = $("#phone").val();



			$.post("/Index/User/Add", { "id": id, "phone": phone, "truename": truename }, function (data) {
				if (data.status == 200) {
					var index = parent.layer.getFrameIndex(window.name);
					window.parent.iframe.contentWindow.location.reload(true);
					console.log(window.parent.iframe);
					parent.layer.close(index);
				} else {
					layer.msg(data.message);
				}
			});
		});
		$(".btncancel").click(function () {
			var index = parent.layer.getFrameIndex(window.name);
			parent.layer.close(index);
		});
	});


</script>

</html>